package com.erp.dto;

import com.erp.domain.TReply;
import com.erp.domain.TTopic;

@SuppressWarnings("serial")
public class Reply extends Article implements java.io.Serializable {

	private Integer floor;// 楼层
	// 用topicId和topicTitle代替Topic对象的引用
	// 防止调用Reply(TReply tReply)构造方法时无限循环导致内存溢出
	private Integer topicId;// 所属的主题ID
	private String topicTitle;// 所属的主题标题

	public Reply() {
	}

	public Reply(TReply tReply) {
		super(tReply);
		TTopic tTopic = tReply.gettTopic();
		if (tTopic != null) {
			this.topicId = tReply.gettTopic().getId();
			this.topicTitle = tReply.gettTopic().getTitle();
		}
		this.floor = tReply.getFloor();
	}

	public Integer getFloor() {
		return floor;
	}

	public void setFloor(Integer floor) {
		this.floor = floor;
	}

	public Integer getTopicId() {
		return topicId;
	}

	public void setTopicId(Integer topicId) {
		this.topicId = topicId;
	}

	public String getTopicTitle() {
		return topicTitle;
	}

	public void setTopicTitle(String topicTitle) {
		this.topicTitle = topicTitle;
	}

}
